package com.bz.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.bz.entity.PreojectAreaEntity;
import com.bz.entity.RoleEntity;
import com.bz.service.IPreojectService;
import com.bz.service.IRoleService;

@RestController
@RequestMapping(value = "/admin/select")
public class SelectController {

    @Autowired
    private IRoleService     roleService;

    @Autowired
    private IPreojectService deviceService;

    @RequestMapping(value = "/role")
    public List<RoleEntity> rolelist() {
        LambdaQueryWrapper<RoleEntity> query = new LambdaQueryWrapper<>();
        return roleService.getBycondition(query);
    }

    @RequestMapping(value = "/preoject-area")
    public List<PreojectAreaEntity> preojectArea() {
        LambdaQueryWrapper<PreojectAreaEntity> query = new LambdaQueryWrapper<>();
        return deviceService.getArea(query);
    }
}
